<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>string、number类型</title>
		<script type="text/javascript">
            var a = new Array();
            if (a instanceof Array) {
                document.write("a是一个数组类型");
            } else {
                document.write("a不是一个数组类型");
            }
        </script>        
        <script type="text/javascript">
            var x = 123;
            var s = String(x) + "<br>" +
                String(123) + "<br>" +
                String(100 + 200 * 3) + "<br>" +
                String("Hello " + 'World!') + "<br>";
            document.write(s); //123  123  700  Hello World!
            document.write(typeof s); //string
        </script>

        <script type="text/javascript">
            var x = 123;
            var s = x.toString() + "<br>" +
                (123).toString() + "<br>" +
                (100 + 200 * 3).toString() + "<br>" +
                ("Hello " + 'World!').toString() + "<br>";
            document.write(s); //123  123  700  Hello World!
            document.write(typeof s); //string
            document.write("<br>");
document.write(3 + null);
document.write("<br>");
document.write("3" + null);
document.write("<br>");
document.write("3" + 1);
document.write("<br>");
document.write("3" - 1);
        </script>
        <script type="text/javascript">
            alert("你好！"); //输出指定内容
            var msg = "你好！张三";
            alert(msg); //输出变量中的内容
            document.write("<strong>你好！<br />李四</strong>");
        </script>
                
	<body>
	</body>
</html>